package com.xuecheng.api.cms;

import com.xuecheng.framework.domain.cms.CmsTemplate;
import com.xuecheng.framework.model.response.QueryResponseResult;
import com.xuecheng.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import java.util.List;

@Api(value = "cms管理模板",description = "cms模板管理接口，提供模板的增、删、改、查")
public interface CmsTemplateControllerApi {

    @ApiOperation("分页查询模板列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name="page",value = "页码",required=true,paramType="path",dataType="int"),
            @ApiImplicitParam(name="size",value = "每页记录数",required=true,paramType="path",dataType="int")
    })
    public QueryResponseResult findList(int page, int size, CmsTemplate cmsTemplate);

    @ApiOperation("查询所有模板")
    public ResponseResult<List<CmsTemplate>> findAllList();

    @ApiOperation("添加模板接口")
    public ResponseResult<CmsTemplate> add(CmsTemplate cmsTemplate);

    @ApiOperation("查询单个模板接口")
    public ResponseResult<CmsTemplate> findById(String id);

    @ApiOperation("修改模板接口")
    public ResponseResult<CmsTemplate> edit(CmsTemplate cmsTemplate);

    @ApiOperation("通过ID删除模板")
    public ResponseResult delete(String id);

}
